home *** CD-ROM | disk | FTP | other *** search
/ El Mac 9 / El Mac 9.iso / Shareware / Applications / MathPad 2.4 / XFuns / fft / fft.rsrc / TEXT_130_rfft().txt < prev    next >
Encoding:
Text File  |  1996-03-06  |  533 b   |  11 lines

  1. ---------------- rfft(R)
  2. -- takes a real array R as input and returns only the positive frequency components of the discrete Fourier transform in the global array "transform". When the input is real, using this routine is more efficient than setting the imaginary part to 0 and using fft().
  3.  
  4. y(t) = cos(360*f*t+phi)     -- example function ** uses degrees **
  5. R[i] = y(dt*(i-1)) dim[n]   -- sample it at period dt
  6. n=8;     f=3;     phi=30;      dt=1/n
  7.  
  8. Nmax:=n/2+1:;  Nsteps:=Nmax:
  9. rfft(R):
  10. table  N,   transform[N,1], transform[N,2]
  11.